home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
xset402.zip
/
XSET.DOC
< prev
next >
Wrap
Text File
|
1994-03-29
|
53KB
|
1,344 lines
╔═════════════════════════════════════════════╗
║ XSET 4.02 : Extended SET Instruction ║░░
║ ║░░
║ (C) 1991-1994 Stern Marc ║░░
╚═════════════════════════════════════════════╝░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Everything you always wanted to put in an environment variable but
were afraid to ask DOS for . . .
XSET: The easy way to write efficient batch files.
XSET allows you to put EVERYTHING you want in a variable of the
current DOS environment and use it as if you assigned it the value with
the standard DOS command 'SET'. You will be able to write very efficient
batch files including string manipulation, calculation, ...
XSET is the most powerful environment variables manipulation program
you ever saw. It also has a very easy and intuitive user interface (very
close to the DOS 'SET' command). It is not a resident program; it so
cannot interfere with any of your other applications.
XSET is fully compatible with MS-DOS (from 3.30), DR-DOS, NDOS & 4DOS.
XSET has seven major features:
═════════════════════════════
- XSET permits to catch the output of any command (internal or
external) or program and put it into an environment variable.
- XSET has built-in commands to modify the output of a program or a
string given on the command-line (extract a part of a string, ...)
- XSET has a built-in full floating-point calculation functionality:
You can program incremental loops, input a calculation string and
output the resulting number, ...
- XSET can manage variable contents of more than 128 characters (your
path can now be as long as you want).
- XSET has other built-in commands to give you access to some system
data (date, time, ...)
- XSET has built-in commands to clear all environment or restore a
previously saved one.
- XSET gives you access to high-level user interface input/output
(line-editing, colors, windows, boxes, ...).
More than sixty commands to do all what you need.
Page 1
╔═════════════════════════════╗
║ Table of contents ║░░
╚═════════════════════════════╝░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
The Shareware concept .................................... Page 2
How to use XSET .......................................... Page 3
Examples of use .......................................... Page 4
Syntax explanation ....................................... Page 7
Input explanation ........................................ Page 7
Options and commands description ......................... Page 8
Input related flags .................................... Page 8
Prompt related flags ................................... Page 9
String related flags ................................... Page 10
Other flags ............................................ Page 11
Order of execution of /options ......................... Page 13
Input commands ......................................... Page 14
Date & time commands ................................... Page 15
Disk & file commands ................................... Page 16
Other commands ......................................... Page 19
Special flags .......................................... Page 20
XSET & XSET_MSG variables ................................ Page 21
Installation ............................................. Page 22
Problems ................................................. Page 22
Batch file programming: Hints & tips ..................... Page 24
Additional information - How to contact the author ....... Page 25
Appendix: E-mail address from other sites ................ Page 25
Page 2
╔═════════════════════════════╗
║ The Shareware concept ║░░
╚═════════════════════════════╝░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
This package is Shareware.
That means that you may try it for evaluation and, if you like it, you
should consider to pay the registration fee (see the file
'REGISTER.HOW'). You will then become a registered user and so have
access to free support, free correction of acknowledged bugs and free
upgrades.
Shareware also mean that you may distribute this package everywhere and
to everybody you want, providing that you always distribute the complete
package. If you have access to any BBS, FTP server, E-mail server or any
other kind of software distribution, feel free to share it with other
people; this may be useful for them and the more people will use (and
register) a shareware program, the more stable it will be and the more
functionalities could be added.
Warning: If you paid to get this package (e.g., it was onto a floppy
─────── with other programs, you downloaded it from a BBS), you only
paid for the physical support (the floppy, the transmission
fee, ...); this does not replace the registration fee.
Note to software distributors:
─────────────────────────────
Nobody is allowed to make any benefit by distributing the XSET
package. Only regular distribution fees are allowed (price of the
floppy, of the network connection, ...).
Page 3
How to use XSET:
═══════════════
XSET will always assign what you tell it into a DOS environment
variable. The main goals of XSET are:
- to ask a question to the user (through the keyboard),
- to catch the output of a program or a command,
- to get pieces of information like current date and time, timestamp
or size of a file, ...
- to modify a string (contained in another variable, in a parameter,
...) like changing it to lower-/upper-case, performing a search on
it, calculating the result of a mathematical expression,
substituting a sub-string by another or extracting a part of it,
- to handle variables longer than 128 characters.
There are four ways to use XSET.
1. Like the normal DOS 'SET' command:
XSET myvar="This is a test string"
2. To get an input from the user:
XSET answer
3. To catch the output of a program or a command:
dir c:\programs\myprog.c | XSET myvar
4. To get various system or environment information:
XSET myvar TIME
Furthermore, to attain a high level of functionality you may add, to
each of the above syntaxs, several option flags to modify the default
behavior of XSET (for example /UPPER to translate into upper-cases, ...).
Syntax: XSET [/OPTIONS...] <dosvar>
────── read a string from standard input
XSET [/OPTIONS...] <dosvar>="string"
equivalent to the DOS command 'SET'
XSET [/OPTIONS...] <dosvar> COMMAND [arguments ...]
╔══════════════════════════════════════════════════════╗
║ Type XSET /? to get the full description ║░░
║ of all functionalities (parameters and effects). ║░░
╚══════════════════════════════════════════════════════╝░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░